package com.wanhai.itm.services;

import com.wanhai.itm.entity.User;

public abstract class AuthenticationService {

    /**
     * login with account and password*
     */
    public abstract boolean login(String userid, String password);

    /**
     * logout current user*
     */
    public abstract void logout();

    
    /**
     * get informatino of logined user
     * @return 
     */
    public abstract User getAuthorizedUser();
    
    /**
     * get default AuthenticationService implementation
     *
     * @return
     */
    public static AuthenticationService getDefaultService() {
        return new AuthenticationServiceImpl();
    }
}
